/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package onlinebuy;

/**
 *
 * @author Yang Wu
 */
import javax.swing.*;
import java.awt.*;

public class Order {

private JFrame f2;
private JButton b1;
private JLabel l1,l2,l3;
private JTextField tf1,tf2,tf3;
private JPasswordField pf1;

public Order(){
    f2=new JFrame("Order");
    f2.setLayout(null);
    l1=new JLabel("111");
    l2=new JLabel("Username");
    l3=new JLabel("Password");
    tf1=new JTextField();
    tf2=new JTextField();
    tf3=new JTextField();
    pf1=new JPasswordField();
    b1=new JButton("Confirm");
   

    f2.add(l1);f2.add(tf1);f2.add(tf2);
    f2.add(pf1);f2.add(tf3);f2.add(b1);
    f2.add(l2);f2.add(l3);

    Insets insets = f2.getInsets();
    Dimension size = l1.getPreferredSize();
    l1.setBounds(0 + insets.left, insets.top,
             200+size.width, 600+size.height);
    size = tf1.getPreferredSize();
    tf1.setBounds(260 + insets.left, 0 + insets.top,
             600+size.width,200+ size.height);

    size = l2.getPreferredSize();
    l2.setBounds(260 + insets.left, 210+insets.top,
             size.width + 20, size.height + 20);

    size = l3.getPreferredSize();
    l3.setBounds(550 + insets.left, 210+insets.top,
             size.width + 20, size.height + 20);

    size = tf2.getPreferredSize();
    tf2.setBounds(260 + insets.left, 250+insets.top,
             size.width + 200, size.height + 20);

    size = pf1.getPreferredSize();
    pf1.setBounds(550 + insets.left, 250+insets.top,
             size.width + 200, size.height + 20);
    size = b1.getPreferredSize();
    b1.setBounds(260 + insets.left, 350+insets.top,
             size.width + 200, size.height + 20);
    size = tf3.getPreferredSize();
    tf3.setBounds(550 + insets.left, 350+insets.top,
             size.width + 200, size.height + 20);

    f2.setSize(800,600);
    f2.setVisible(true);

}
}
